package com.raylu.realtime.app.func;

import com.raylu.realtime.utils.DateUtil;
import org.apache.flink.table.functions.ScalarFunction;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Description:
 * <p>
 * Create by lucienoz on 2022/1/9.
 * Copyright © 2022 lucienoz. All rights reserved.
 */
public class ConvertTimeStrFunction extends ScalarFunction {
    public ConvertTimeStrFunction() {
    }

    public String eval(LocalDateTime ts) {
        return DateUtil.getFormatDateTime(ts);
    }

}
